/* stylelint-disable */
@import '~choerodon-ui/lib/style/themes/default';

@success: #00bfa5;
@running: #4d90fe;
@pending: #ffb100;
@failed: #f77a70;
@canceled: #d8d8d8;
@skipped: #d8d8d8;
@stop: #ff7043;
@not_audit: #f1b42d;

.c7ncd-action-menu-item-content-audit-popover {
  .c7n-popover-inner-content {
    padding: 0 !important;
  }
  .c7n-popover-content {
    position: relative;
    bottom: 6px;
    left: 4px;
  }
}

.c7ncd-action-menu-item-content-audit-item {
  margin: 0;
  padding: 0.12rem 0.16rem;
  cursor: pointer;
}

.c7ncd-action-menu-item-content-audit-item:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.pipelineManage_tree {
  flex-basis: 20%;
  border-right: 1px solid rgba(216, 216, 216, 1);
}

.c7ncd-pipelineManage {
  &-ctyun-tree {
    .c7n-tree .c7n-tree-node-content-wrapper {
      width: 100%;
      overflow: hidden;
    }
    .c7n-tree .c7n-tree-switcher-noop {
      display: none;
    }
    .c7n-tree.c7n-tree .c7n-tree-treenode .c7n-tree-node-content-wrapper:hover,
    .c7n-tree.c7n-tree li .c7n-tree-node-content-wrapper:hover {
      background: #fff !important;
    }
  }
  &-sidebar {
    z-index: 1;
    width: 100%;
    height: 100%;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 0.15rem;

    .c7n-pro-input-focused {
      .suffix-container {
        .line {
          height: 28px !important;
        }
      }
    }

    &-search {
      display: block;
      margin: 0 0.1rem 0.16rem;

      input {
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
      }

      .c7n-pro-input {
        padding-right: 0.44rem !important;
      }

      .c7n-pro-input-suffix {
        width: 27px;
      }

      .suffix-container {
        width: 27px !important;
        position: relative;
        .line {
          width: 1px;
          height: 30px;
          position: absolute;
          right: 28px;
          top: -4px;
          background-color: #d9e6f2;
        }
        .c7n-pro-btn {
          width: 27px !important;
          height: 22px;
          background-color: #fff !important;
          display: flex;
          justify-content: center;
          align-items: center;
        }
        .c7n-pro-btn:hover {
          background-color: #fff !important;
          box-shadow: none !important;
        }
        .point {
          width: 5.5px;
          height: 5.5px;
          background: #f76776;
          border-radius: 50%;
          position: absolute;
          top: 1px;
          right: 2px;
        }
      }

      .@{c7n-pro-prefix}-input-prefix {
        left: 0.08rem;

        .icon {
          font-size: 0.2rem;
        }
      }

      .@{c7n-pro-prefix}-input:not(textarea):not(:first-child) {
        padding-left: 0.32rem;
      }
    }

    .c7n-scrollbar-y {
      height: 93%;
    }

    &-tree {
      //margin-top: .16rem;

      .@{c7n-prefix}-tree-treenode {
        width: 100%;
        padding: 0 !important;

        &:last-child {
          margin-bottom: 0.1rem;
        }

        &:last-child,
        .@{c7n-prefix}-tree-node-content-wrapper-open {
          .c7ncd-pipelineManage-sidebar-header-parent {
            border-bottom: 1px solid rgba(216, 220, 235, 1);
          }
        }

        span.@{c7n-prefix}-tree-switcher.@{c7n-prefix}-tree-switcher-noop {
          background-color: transparent !important;
        }
      }

      .@{c7n-prefix}-tree-node-content-wrapper {
        width: 100%;
        padding: 0;
        overflow: hidden;

        &:hover {
          opacity: 1 !important;
        }
      }

      .@{c7n-prefix}-tree-treenode-selected {
        background: #f5f6fa;
        border-left: 4px solid #6887e8;

        .@{c7n-prefix}-tree-switcher {
          margin-left: -4px !important;
        }

        .c7ncd-pipelineManage-sidebar-header-node {
          background: #f5f6fa !important;
        }
      }

      .@{c7n-prefix}-tree-node-selected {
        background-color: transparent !important;

        .@{c7n-prefix}-tree-title {
          color: var(--text-color) !important;
        }
      }

      .@{c7n-prefix}-tree-indent {
        display: none;
      }

      .@{c7n-prefix}-tree-switcher-icon {
        font-size: 0.2rem;
        margin-top: 0.1rem !important;
      }
    }

    &-header {
      display: flex;
      align-items: center;
      line-height: 0.18rem;

      &-parent {
        padding: 0.08rem 0.04rem;
        border-top: 1px solid rgba(216, 220, 235, 1);
        border-image: linear-gradient(to right, rgba(216, 220, 235, 0.2), rgba(216, 220, 235)) 30 30;
      }

      &-node {
        display: flex;
        align-items: center;
        line-height: 0.18rem;
        padding: 0.05rem 0.04rem;

        &-more {
          background: #fff !important;
          cursor: default;

          &-text {
            color: #5266d4;
            cursor: pointer;
            font-size: 0.12px;
          }
        }
      }

      &:first-child {
        margin-bottom: 0.05rem;
      }
      &:last-child {
        margin-bottom: 0;
      }

      &-name {
        font-weight: 400;
        margin-left: 0.04rem;
        flex-grow: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;

        .c7ncd-treemenu-text {
          width: 100%;
        }
      }

      &-time {
        font-size: 0.12rem;
        color: rgba(58, 52, 95, 0.65);
      }

      &-active {
        width: 0.5rem;
        height: 0.2rem;
        line-height: 0.2rem;
        color: #fff;
        font-size: 0.12rem;
        font-weight: 500;
        text-align: center;
        transform: scale(0.8);
        margin-left: -0.05rem;

        &-true {
          background: @success;
        }
        &-false {
          background: rgba(0, 0, 0, 0.2);
        }
      }

      &-service {
        color: var(--text-color3);
      }

      &-status {
        transform: scale(0.8);
        margin-left: -0.05rem;
      }

      &-icon {
        color: @canceled;
        margin-right: 0.13rem;

        &-success {
          color: @success;
        }
        &-running {
          color: @running;
        }
        &-pending {
          color: @pending;
        }
        &-failed {
          color: @failed;
        }
        &-stop {
          color: @stop;
        }
        &-not_audit {
          color: @not_audit;
        }
      }

      &-number {
        font-size: 0.12rem;
        color: #3a345f;
        max-width: 0.56rem;
        margin-right: 0.1rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      &-stage {
        margin: 0 auto 0 0;

        &-item {
          width: 0.08rem;
          height: 0.08rem;
          display: inline-block;
          border-radius: 50%;
          background: @canceled;

          &-success {
            background: @success;
          }

          &-failed {
            background: @failed;
          }

          &-running {
            background: @running;
          }

          &-pending {
            background: @pending;
          }

          &-stop {
            background: @stop;
          }

          &-not_audit {
            background: @not_audit;
          }
        }

        &-line {
          width: 0.06rem;
          height: 1px;
          border-top: 1px solid #d3d3d3;
          display: inline-block;
          vertical-align: middle;
          margin: 0.02rem;

          &-manual {
            border-top: 1px dotted @not_audit;
          }

          &:first-child {
            display: none;
          }
        }
      }

      .c7ncd-pipelineManage-title-type {
        line-height: 13px !important;
      }
    }

    .infinite-scroll-component__outerdiv {
      height: calc(100% - 0.65rem);
    }

    &-empty {
      color: var(--text-color3);
      text-align: center;
      display: block;
    }
  }

  &-title-type {
    flex-shrink: 0;
  }
}

.c7ncd-pipelineManage-sidebar-overlay {
  padding: 12px 10px;
  &-container-button {
    text-align: right;
  }
}
